<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Users
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Users</h2>
    <table>
        <tr>
            <th>User Name</th>
            <th></th>
            <th></th>
        </tr>
        
    <% foreach (MembershipUser user in ViewData.Model as MembershipUserCollection)
       { %>
        <tr>
            <td>
                <% if (!user.IsApproved)
                   { %>
                    <span style="text-decoration: line-through">
                   <%}
                   else
                   { %>
                    <span>
                   <% } %>
                <%= Html.Encode(user.UserName) %></span>
            </td>
            <td>
                <%= Html.ActionLink("Edit User", "EditUser", new { id = user.ProviderUserKey })%>
            </td>
            <td>
                <% if (user.IsApproved)
                   { %>
                <%= Html.ActionLink("Reset Password", "ResetUserPassword", new { id = user.ProviderUserKey })%>
                <% } %>
            </td>
        </tr>
    <%  } %>
    </table>
    <div>
        <%= Html.ActionLink("Create New User", "Register") %>
    </div>
</asp:Content>
